<?php
switch($action) {
case showConfig;
	showConfig();
	break;
}



function showConfig() {
	global $config,$userInfo;
	if(_g('submit')) {
//		$fp = fopen('../config.php', 'r');
//		$configfile = fread($fp, filesize('../config.php'));
//		fclose($fp);
//		$configfile = str_replace("'manage' => '".$config['manage']."'", "'manage' => '".trim(_g('manage'))."'", $configfile);
//		$configfile = str_replace("'domain' => '".$config['domain']."'", "'domain' => '".trim(_g('domain'))."'", $configfile);
//		$configfile = str_replace("'web' => '".$config['web']."'", "'web' => '".trim(_g('web'))."'", $configfile);
//		$configfile = str_replace("'pic' => '".$config['pic']."'", "'pic' => '".trim(_g('pic'))."'", $configfile);
//		$configfile = str_replace("'home' => '".$config['home']."'", "'home' => '".trim(_g('home'))."'", $configfile);
//		$configfile = str_replace("'HASHCODE' => '".$config['HASHCODE']."'", "'HASHCODE' => '".trim(_g('HASHCODE'))."'", $configfile);
//		$configfile = str_replace("'beian' => '".$config['beian']."'", "'beian' => '".trim(_g('beian'))."'", $configfile);
		$config = _g('config');
		setCache(dirname(__file__).'/../','config',$config,1);
		$message = array(
			'status' => 'success',
		);
		echo json_encode($message);
		exit;
	}
	include template('manage/config');
}


?>